export enum ProcessStatusEnum {
  ACT_010,
  ACT_011,
  ACT_012,
  ACT_013,
  ACT_014,
  ACT_015,
  ACT_016,
  ACT_017,
  ACT_018,
  ACT_019,
  END
}

export enum IsHandlerEnum {
  NO_EDIT,
  EDIT
}

export const FlowStatusEnum = [
  { value: "0", label: "未开始" },
  { value: "1", label: "进行中" },
  { value: "2", label: "已结束" }
];

export const BillStatusMap = new Map([
  ["1", "到货验收"],
  ["5", "有监理隐蔽验收"],
  ["6", "无监理隐蔽验收"],
  ["7", "有监理土建竣工验收"],
  ["8", "无监理土建竣工验收"],
  ["9", "开工审批"],
  ["10", "材料审批"]
]);

export const FileTypes = {
  doc: "application/msword",
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
  xls: "application/vnd.ms-excel",
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  pdf: "application/pdf",
  png: "image/png",
  jpg: "image/jpeg",
  jpeg: "image/jpeg"
};

export const docTypesMatch = value =>{
  const office = ["doc","docx","xls","xlsx","pdf","ppt","pptx"];
  const model = ["fbx","stl","obj","rvm","bmv","rfa","dgn","rvt","skp"];
  const blueprint = ["dwg"];
  const img = ["png","jpg","jpeg","bmp","gif","svg","webp"];
  const other = ["zip"];
  if(office.includes(value)){
    return {name:"办公",key:"1"}
  }
  else if(model.includes(value)){
    return {name:"模型",key:"2"}
  }
  else if(blueprint.includes(value)){
    return {name:"图纸",key:"3"}
  }
  else if(img.includes(value)){
    return {name:"图片",key:"4"}
  }
  else if(other.includes(value)){
    return {name:"其他",key:"5"}
  }
  else{
    return {name:"其他",key:""}
  }
};


export const uploadUrl =
  import.meta.env.VITE_BASE_URL + "/snow-admin/common/file/upload";


export const acceptTypes = Object.values(FileTypes).join(",");
